package com.device.util;

import java.util.List;
import java.io.Serializable;
import java.util.ArrayList;

/** 分页 */
public class Page<T> implements Serializable{

	private static final long serialVersionUID = 6896314165341626975L;
    private int totalCount;
	private List<T> data = new ArrayList<>();
	private Pageable pageable;
	public Page(){
		this.totalCount = 0;
		this.pageable = new Pageable();
	}
	public List<T> getData() {
		return data;
	}
	public void setData(List<T> data) {
		this.data = data;
	}
	public Pageable getPageable() {
		return pageable;
	}
	public void setPageable(Pageable pageable) {
		this.pageable = pageable;
	}
	public Page(List<T> list,Pageable p,int totalCount){
		this.data.addAll(list);
		this.pageable = p;
		this.totalCount = totalCount;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getPageNumber(){
		return this.getPageNumber();
	}
}
